// 传参props
export default [
  // 传参props配置为true时本通过this.$route.params暴露的路径参数被设置为组件内的props
  {
    path: '/boolean-props/:username/:pwd',
    props: true,
    component: () => import('@/views/props/BooleanProps.vue')
  },
  // 传参props配置为对象时该对象被原样设置为组件内的props
  {
    path: '/object-props',
    props: {
      username: 'Song',
      pwd: '2004'
    },
    component: () => import('@/views/props/ObjectProps.vue')
  },
  // 传参props配置为函数时该函数的对象返回值被原样设置为组件内的props
  {
    path: '/func-props',
    props: route => {
      console.log('函数传参参数', route);
      return {
        username: 'XUAN',
        pwd: '0403'
      };
    },
    component: () => import('@/views/props/FuncProps.vue')
  },
  /**
   * 命名视图只需传参props配置与components配置结构相同，分别传参即可
   * components: { default: User, sidebar: Sidebar },
   * props: { default: true, sidebar: false }
   */
];